export default {

    /* data_type 为 bool 时选，没有 3 级信息 */
    boolOpts: [
        { key: 'isTrue', name: '为真' },
        { key: 'isFalse', name: '为假' },

        { key: 'isSet', name: '有值' },
        { key: 'notSet', name: '无值' },
    ],

    /* data_type 为 string 时选 */
    textOpts: [
        { key: 'equal', name: '等于' },             // 可输入多个字符串
        { key: 'notEqual', name: '不等于' },

        { key: 'contain', name: '包含' },
        { key: 'notContain', name: '不包含' },

        { key: 'isSet', name: '有值' },
        { key: 'notSet', name: '无值' },
        { key: 'isEmpty', name: '为空' },
        { key: 'isNotEmpty', name: '不为空' },

        // { key: 'rlike', name: '正则匹配' },
        // { key: 'notrlike', name: '正则不匹配' },
    ],

    /* data_type 为 number 时选 */
    numberOpts: [
        { key: 'equal', name: '等于' },         // 可输入多个数字
        { key: 'notEqual', name: '不等于' },

        { key: 'less', name: '小于' },          // 只需输入一个数字
        { key: 'greater', name: '大于' },

        { key: 'between', name: '区间' },       // 需输入 2 个数字，并且

        { key: 'isSet', name: '有值' },
        { key: 'notSet', name: '无值' },
    ],

    /* data_type 为 datetime 时选  */
    datetimeOpts: [
        { key: 'absolute_between', name: '绝对时间' },    // 任意时间区间（精确到分，但是好像是写死 00:00）
        { key: 'relative_within', name: '相对当前时间点', arr: [{ key: 'relative_within', name: '之内' }, { key: 'relative_before', name: '之前' }] },
        { key: 'relative_between', name: '相对当前时间区间' },
        { key: 'relative_event_time', name: '相对事件发生时间' },

        { key: 'isSet', name: '有值' },
        { key: 'notSet', name: '无值' },
    ],

    /* data_type 为 list 时选 */
    listOpts: [
        { key: 'contain', name: '包含' },
        { key: 'notContain', name: '不包含' },

        { key: 'isEmpty', name: '为空' },
        { key: 'isNotEmpty', name: '不为空' },

        { key: 'isSet', name: '有值' },
        { key: 'notSet', name: '无值' },
    ],

    // 相对事件发生时间 选项
    relativeEventTime: [
        { key: '+', name: '(现在) 之后' },
        { key: '-', name: '(现在) 之前' },
        { key: 'day', name: '今天' },
        { key: 'week', name: '本周' },
        { key: 'month', name: '本月' },
    ],

    // 时间单位
    timeUnit: [
        { key: 'second', name: '秒' },
        { key: 'minute', name: '分种' },
        { key: 'hour', name: '小时' },
        { key: 'day', name: '天' },
    ],


    // 自定义校验条件
    rules: {
        // 可输入多个值
        createCommon: {
            dataTypeArr: ['number', 'string'],      //第一个下拉框
            newDataTypeArr: ['equal', 'notEqual'],  // equal 等于 | notEqual 不等于      第二个下拉框

            key: 'customArr',        //第三个下拉框
        },

        // 可输入单个值
        inputCommon: {
            dataTypeArr: ['number', 'string'],

            // less 小于 | greater 大于 | contain 包含 | notContain 不包含 | rlike 正则匹配 | notrlike 正则不匹配
            newDataTypeArr: ['less', 'greater', 'contain', 'notContain', 'rlike', 'notrlike'],

            key: 'customStr',
        },

        // 数值区间
        numBetween: {
            dataTypeArr: ['number'],
            newDataTypeArr: ['between'],            // between 区间

            key: ['customNumBetween_0', 'customNumBetween_1'],
        },

        // 时间区间 默认
        autoDateBetween: {
            dataTypeArr: ['datetime'],
            newDataTypeArr: ['absolute_between'],   // absolute_between 绝对时间

            key: 'customAutoDateBetween',
        },

        // 相对当前时间点时
        relativeWithin: {
            dataTypeArr: ['datetime'],
            newDataTypeArr: ['relative_within'],   // relative_within 相对当前时间点

            key: ['customNumDate', 'customRelative'],
        },

        // 相对当前时间区间
        dayBetween: {
            dataTypeArr: ['datetime'],
            newDataTypeArr: ['relative_between'],   // relative_within 相对当前时间区间

            key: ['customNumDate_0', 'customNumDate_1'],
        },

        // 相对事件发生时间
        eventTime: {
            dataTypeArr: ['datetime'],
            newDataTypeArr: ['relative_event_time'],   // relative_event_time 相对时间发生时间

            key: ['customEventTime', 'customNumDate_2', 'customTimeUnit']
        },

    },

    initChartViewData:{"by_field":"user.gender","rows":[{"by_value":"女","total_people":6093.0,"cells":[{"people":1157.0,"percent":18.99,"bucket_start":20.0,"bucket_end":30.0},{"people":4070.0,"percent":66.8,"bucket_start":30.0,"bucket_end":50.0},{"people":843.0,"percent":13.84,"bucket_start":50.0,"bucket_end":100.0},{"people":23.0,"percent":0.38,"bucket_start":100.0}]},{"by_value":"男","total_people":6003.0,"cells":[{"people":1154.0,"percent":19.22,"bucket_start":20.0,"bucket_end":30.0},{"people":3965.0,"percent":66.05,"bucket_start":30.0,"bucket_end":50.0},{"people":866.0,"percent":14.43,"bucket_start":50.0,"bucket_end":100.0},{"people":18.0,"percent":0.3,"bucket_start":100.0}]},{"total_people":156.0,"cells":[{"people":0.0,"percent":0.0,"bucket_start":20.0,"bucket_end":30.0},{"people":0.0,"percent":0.0,"bucket_start":30.0,"bucket_end":50.0},{"people":0.0,"percent":0.0,"bucket_start":50.0,"bucket_end":100.0},{"people":156.0,"percent":100.0,"bucket_start":100.0}]}],"report_update_time":"2021-07-18 11:47:56.551","data_update_time":"2021-07-18 11:43:39.000","data_sufficient_update_time":"2021-07-18 11:43:39.000","truncated":false,"sampling_factor":64.0,"is_done":true},

    overviewStep:[
        {label:"LTV 当天", value: 0},
        {label:"LTV 1", value: 1},
        {label:"LTV 2", value: 2},
        {label:"LTV 3", value: 3},
        {label:"LTV 4", value: 4},
        {label:"LTV 5", value: 5},
        {label:"LTV 6", value: 6},
        {label:"LTV 7", value: 7},
        {label:"LTV 15", value: 8},
        {label:"LTV 30", value: 9},
        {label:"LTV 60", value: 10},
        {label:"LTV 90", value: 11}
    ]
};
